package saeildamil.common;

public class Student {
	static int totalNum;	//총학생수
	private String stdNum;	//학번
	private String stdName;
	private int korScore;	
	private int mathScore;
	private int engScore;
	
	public Student(String stdName) {
		super();
		this.stdName = stdName;
	}
	public Student(String stdNum, String stdName) {
		super();
		this.stdNum = stdNum;
		this.stdName = stdName;
	}
	public Student(String stdName, int korScore, int mathScore, int engScore) {
		super();
		this.stdName = stdName;
		this.korScore = korScore;
		this.mathScore = mathScore;
		this.engScore = engScore;
	}
	public Student(String stdNum, String stdName, int korScore, int mathScore,
			int engScore) {
		super();
		this.stdNum = stdNum;
		this.stdName = stdName;
		this.korScore = korScore;
		this.mathScore = mathScore;
		this.engScore = engScore;
	}
	
	public String getStdNum() {
		return stdNum;
	}
	public void setStdNum(String stdNum) {
		this.stdNum = stdNum;
	}
	public int TotalScore(){
		return korScore+mathScore+engScore;
	}
	
	public double Avg(){
		double avg=TotalScore() / 3.0;
		String result=String.format("%.2f", avg);
		return Double.parseDouble(result);

	}
	@Override
	public String toString() {
		return "[" + stdNum + "]"+stdName+" "+korScore+" "+mathScore
				+" "+engScore;
	}
	public int getKorScore() {
		return korScore;
	}
	public void setKorScore(int korScore) {
		this.korScore = korScore;
	}
	public int getMathScore() {
		return mathScore;
	}
	public String getStdName() {
		return stdName;
	}
	public void setStdName(String stdName) {
		this.stdName = stdName;
	}
	public void setMathScore(int mathScore) {
		this.mathScore = mathScore;
	}
	public int getEngScore() {
		return engScore;
	}
	public void setEngScore(int engScore) {
		this.engScore = engScore;
	}
	
}
